package kr.co.hk.fac;

import kr.co.hk.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.AdapterView.OnItemClickListener;

public class FacGroupList extends Activity {
	
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.fac_group_list);	
		ListView listView = (ListView) findViewById(R.id.listView);
		ArrayAdapter adapter = ArrayAdapter.createFromResource(this, R.array.searchFacCl, android.R.layout.simple_list_item_1);
		listView.setAdapter(adapter);
		
		listView.setOnItemClickListener(new OnItemClickListener() {
		Bundle extra = getIntent().getExtras();
		int localNum = extra.getInt("localNum");
		
			@Override
			public void onItemClick(AdapterView<?> arg0, View v, int position,
					long id) {
					Intent intent = new Intent(FacGroupList.this, FacList.class);			
					intent.putExtra("localNum", localNum);
					intent.putExtra("groupNum", position);
					startActivity(intent);
					
			}
		});
	}
	
}
